<?php

/**
 * Instructor form base class.
 *
 * @method Instructor getObject() Returns the current form's model object
 *
 * @package    ecollegeplus
 * @subpackage form
 * @author     Batanayi Matuku
 * @version    SVN: $Id: sfDoctrineFormGeneratedInheritanceTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BaseInstructorForm extends ProfileForm
{
  protected function setupInheritance()
  {
    parent::setupInheritance();

    $this->widgetSchema   ['employment'] = new sfWidgetFormChoice(array('choices' => array('Full time' => 'Full time', 'Part time' => 'Part time')));
    $this->validatorSchema['employment'] = new sfValidatorChoice(array('choices' => array(0 => 'Full time', 1 => 'Part time'), 'required' => false));

    $this->widgetSchema   ['is_student'] = new sfWidgetFormInputCheckbox();
    $this->validatorSchema['is_student'] = new sfValidatorBoolean(array('required' => false));

    $this->widgetSchema   ['current_study'] = new sfWidgetFormInputText();
    $this->validatorSchema['current_study'] = new sfValidatorString(array('max_length' => 255, 'required' => false));

    $this->widgetSchema   ['studied_at'] = new sfWidgetFormInputText();
    $this->validatorSchema['studied_at'] = new sfValidatorString(array('max_length' => 255, 'required' => false));

    $this->widgetSchema   ['employment_start_date'] = new sfWidgetFormDateTime();
    $this->validatorSchema['employment_start_date'] = new sfValidatorDateTime(array('required' => false));

    $this->widgetSchema   ['employment_end_date'] = new sfWidgetFormDateTime();
    $this->validatorSchema['employment_end_date'] = new sfValidatorDateTime(array('required' => false));

    $this->widgetSchema->setNameFormat('instructor[%s]');
  }

  public function getModelName()
  {
    return 'Instructor';
  }

}
